<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.01.
   家居商家VIP帐号设置模型($$)*/

!defined('Q_PATH') && exit;

class JiajucompanyvipModel extends CommonModel{

	static public function init__(){
		return array(
			'table_name'=>'jiajucompanyvip',
			'check'=>array(
				'jiajucompanyvip_music'=>array(
					array('empty'),
					array('max_length',250,Q::L('音乐链接不能超过250个字符','__APPJIAJU_COMMON_LANG__@Model')),
					array('url',Q::L('音乐链接只能是正确的URL格式','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanyvip_sinaweibo'=>array(
					array('max_length',50,Q::L('新浪微博不能超过50个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanyvip_qqweibo'=>array(
					array('max_length',50,Q::L('腾讯微博不能超过50个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanyvip_kfcode'=>array(
					array('max_length',1500,Q::L('客服代码不能超过1500个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanyvip_video'=>array(
					array('max_length',250,Q::L('视频代码不能超过250个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
			),
		);
	}

	static function F(){
		$arrArgs=func_get_args();
		return ModelMeta::instance(__CLASS__)->findByArgs($arrArgs);
	}

	static function M(){
		return ModelMeta::instance(__CLASS__);
	}
	
	protected function beforeSave_(){
		$this->jiajucompanyvip_music=C::strip($this->jiajucompanyvip_music);
		$this->jiajucompanyvip_sinaweibo=C::text($this->jiajucompanyvip_sinaweibo);
		$this->jiajucompanyvip_qqweibo=C::text($this->jiajucompanyvip_qqweibo);
		$this->jiajucompanyvip_video=C::strip($this->jiajucompanyvip_video);
	}

}
